package part17_策略模式_鸭子问题.p01_传统方式;

/**
 * @ClassName: Duck
 * @Author: AllenSun
 * @Date: 2020/3/9 0:02
 */
public abstract class Duck {
    //无参构造器
    public Duck() {
    }

    //抽象方法，显示鸭子的信息
    public abstract void display();

    public void quack(){
        System.out.println("鸭子嘎嘎叫");
    }

    public void swim(){
        System.out.println("鸭子会游泳");
    }

    public void fly(){
        System.out.println("鸭子会飞翔");
    }
}
